from django.db import models

class NewsArticle(models.Model):
    title = models.CharField(max_length=200)
    link = models.URLField()
    content = models.TextField()
    pub_date = models.DateField()
    wordcloud_image = models.ImageField(upload_to='wordclouds/', null=True, blank=True)

    def __str__(self):
        return self.title

class Person(models.Model):
    name = models.CharField(max_length=100)
    position = models.CharField(max_length=200)
    pub_date = models.DateField()
    involvement = models.TextField()
    link = models.URLField(default='')